<?php
/**
 * The main template file.
 *
 * This is  template file in a crazyminecraft.net
 * and one of the two required files for a theme (the other being style.css).
 * It is used to display a page when nothing more specific matches a query.
 * E.g., it puts together the home page when no home.php file exists.
 * Learn more: http://crazyminecraft.net
 *
 * @package WordPress
 * @subpackage crazyminecraft.net
 * @since crazyminecraft.net 1.0
 */
?>
<?php 
global $query_string;
query_posts($query_string . '&orderby=modified');
	if ( have_posts() ) :
	$iIndex = 0;
		while ( have_posts() ) : the_post();
?>
<div class="<?php if ($iIndex%2 == 0) echo 'post-even'; else echo 'post-odd'?> post-<?php the_ID();?> post type-post status-publish format-standard hentry category-uncategorized" id="post-<?php the_ID();?>">
	<div>
	<div id="thumbnail-<?php the_ID();?>" class="thumbnail"><?php the_post_thumbnail(); ?></div>
	<div id="post-descript-<?php the_ID();?>" class="post-descript">
		<h2 class="entry-title">
			<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a>
		</h2>
		<div class="postAuthor">by <?php the_author_posts_link(); ?> on <?php the_time('F jS, Y') ?> | <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?> | <strong><?php echo getPostViews(get_the_ID());?></strong></div>
		<div class="entry">
			<?php 
			$content = get_the_content();
			$trimmed_content = wp_trim_words( $content, 20, '<p><a href="'. get_permalink() .'"> Continue to reading →</a></p>' );
			echo $trimmed_content;
			?>
		</div>
	</div>
	<div style="clear: both;"></div>
	</div>
</div>

<?php
$iIndex ++;
endwhile;
 if(function_exists('wp_paginate')) {
    wp_paginate();
} 
endif;

?>